package com.note.app.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 集合响应DTO
 */
@Data
@Schema(description = "集合信息")
public class CollectionDTO {
    
    @Schema(description = "集合ID", example = "1")
    private Long id;
    
    @Schema(description = "所属用户ID", example = "1")
    private Long userId;
    
    @Schema(description = "父级集合ID", example = "0")
    private Long parentId;
    
    @Schema(description = "集合名称", example = "学习笔记")
    private String name;
    
    @Schema(description = "集合描述", example = "这是一个学习笔记的集合")
    private String description;
    
    @Schema(description = "图片地址", example = "https://example.com/image.jpg")
    private String icon;
    
    @Schema(description = "表情符号", example = "📁")
    private String emoji;

    @Column(name = "created_at")
    @Schema(description = "创建时间", example = "2023-10-01T12:00:00")
    private LocalDateTime createdAt;

    @Column(name = "updated_at")
    @Schema(description = "更新时间", example = "2023-10-01T12:00:00")
    private LocalDateTime updatedAt;
    
    @Schema(description = "子集合列表")
    private List<CollectionDTO> children;
} 